#ifndef SWCLIENTWIDGET_H
# define SWCLIENTWIDGET_H

# include <QTcpSocket>

# include "swcommonwidget.h"

class SWClientWidget : public SWCommonWidget
{
    Q_OBJECT

public:
    SWClientWidget(QString, int);
    ~SWClientWidget();
    bool isConnected() {
        return m_client->state() == QAbstractSocket::ConnectedState; }

private:
    QTcpSocket *m_client;

    void connectSignals();
    void createClient(QString, int);

private slots:
    void readyRead();
    void disconnected();
    void connected();
    void sendData();
};

#endif

